remove repetitive values in an array